package com.bf.hotpoint.domain;

import java.io.Serializable;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.data.annotation.Id;
import org.springframework.data.geo.Point;
import org.springframework.data.mongodb.core.mapping.Document;

import com.bf.hotpoint.service.impl.MessageServiceImpl;

@Document(collection = "testObject")
public class TestObject implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 52322080747091974L;
	@Id
	private String id;
	private int age;
	private String name;
	private List<String> addrs;
	/*@GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE)*/
	private Point location;
	//private double[] location;
	
	public List<String> getAddrs() {
		return addrs;
	}
	public void setAddrs(List<String> addrs) {
		this.addrs = addrs;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	/*public double[] getLocation() {
		return location;
	}
	public void setLocation(double[] location) {
		this.location = location;
	}*/
	
	static Logger log = Logger.getLogger(MessageServiceImpl.class.getName());
	
	@Override
    public String toString() {
        return String.format(
        		"Customer[id=%s, name='%s', age='%d', x='%f', y='%f']",
                id, name, age,location.getX(),location.getY());
    }
	public Point getLocation() {
		return location;
	}
	public void setLocation(Point location) {
		this.location = location;
	}
}
